#ifndef DEFINES_H_INCLUDED
#define DEFINES_H_INCLUDED

/*
**  This program is free software: you can redistribute it and/or modify
**  it under the terms of the GNU General Public License as published by
**  the Free Software Foundation, either version 3 of the License, or
**  (at your option) any later version.
**
**  This program is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
**  GNU General Public License for more details.
**
**  You should have received a copy of the GNU General Public License
**
************  File Info  ********************************
**
**  Author: CMlr<zxyzxy12321@gmail.com>
**  Date:
**  Project: MyPowder
**  Description:
**
**
*/


#if defined(WIN32) && !defined(__GNUC__)
#define __inline _inline
#else
#define __inline inline
#endif


#define FLOAT_ACCURACY (0.000001f)

/* video setting */
#define XRES 640
#define YRES 480
#define COLOR_BIT 32

#define MIN_UPDATE_INTERVAL (1)


#define FUNCTION_EXIT_FAILURE 1
/* ..... */
#define MAX_PART_COUNT 10000
#define PART_I_INVALID (-1)

/* elements */
#define PT_NONE 0
#define PT_WATR 1
#define PT_GAS  2
#define PT_MAX  3


#define LIFE_DEFAULT 100

#define TEMP_ZERO   ((float)-273.15f)
#define TEMP_ROOM   (20.0f)



typedef unsigned long color_t;


/* particle type */
struct part_t {
    int x, y;
    float temp;
    int type, ctype;
    int life;
    int tmp;
};

typedef struct part_t part_t;

/* particle map type */
typedef struct {
    int i;
} pmap_t;


#endif // DEFINES_H_INCLUDED
